<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">新闻管理</a></li>
        <li ><a href="{:U('news/add',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">新增新闻</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('news/index')}">
        <select name="s_tid">
            <option value="">全部</option>
            <foreach name="type_list" item="titem">
                <option <if condition="$s_tid == $titem['id']">selected</if> value="{$titem.id}">
                {$titem.title}
                </option>
            </foreach>
        </select> &nbsp;&nbsp;
        关键字：
        <input type="text" name="keyword" style="width: 200px;" value="{$keyword}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:U('news/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <td>所属分类</td>
               <td>标题</td>
                <td>描述</td>
                <td>首页图片</td>
                <td>列表页图片</td>
                <td>阅读量</td>
				<td>创建时间</td>
                <td>更新时间</td>
				<td>操作</td>
            </tr>
            </thead>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.type_title}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.desc}</td>
                    <td><img src="{:sp_get_image_preview_url($vo['home_picture'])}"   width="100" /></td>
                    <td><img src="{:sp_get_image_preview_url($vo['picture'])}"   width="100" /></td>
                    <td>{$vo.read_num}</td>
					<td>{:date("Y-m-d H:i:s",$vo["create_time"])}</td>
                    <td>{:date("Y-m-d H:i:s",$vo["update_time"])}</td>
					<td><a href="{:U('news/add',array('id'=>$vo['id']))}">编辑</a> |<a href="{:U('news/delete',array('id'=>$vo['id']))}">删除</a> </td>
                </tr>
            </foreach>

        </table>

        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('AdminPost/index',$formget)}";
        }
    }

</script>
</body>
</html>